home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / var / db / pkg / net-wireless / ipw2200-1.1.2-r1 / ipw2200-1.1.2-r1.ebuild < prev    next >
Text File  |  2006-05-11  |  2KB  |  87 lines

  1. # Copyright 1999-2006 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: /var/cvsroot/gentoo-x86/net-wireless/ipw2200/ipw2200-1.1.2-r1.ebuild,v 1.2 2006/04/22 14:40:48 brix Exp $
  4.  
  5. inherit eutils linux-mod
  6.  
  7. # The following works with both pre-releases and releases
  8. MY_P=${P/_/-}
  9. S=${WORKDIR}/${MY_P}
  10.  
  11. IEEE80211_VERSION="1.1.13"
  12. FW_VERSION="3.0"
  13.  
  14. DESCRIPTION="Driver for the Intel PRO/Wireless 2200BG/2915ABG miniPCI and 2225BG PCI adapters"
  15. HOMEPAGE="http://ipw2200.sourceforge.net/"
  16. SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz"
  17.  
  18. LICENSE="GPL-2"
  19. SLOT="0"
  20. KEYWORDS="~amd64 x86"
  21.  
  22. IUSE="debug"
  23. DEPEND=">=net-wireless/ieee80211-${IEEE80211_VERSION}
  24.         sys-apps/sed"
  25. RDEPEND=">=net-wireless/ieee80211-${IEEE80211_VERSION}
  26.         >=net-wireless/ipw2200-firmware-${FW_VERSION}
  27.         net-wireless/wireless-tools"
  28.  
  29. BUILD_TARGETS="all"
  30. MODULE_NAMES="ipw2200(net/wireless:)"
  31. MODULESD_IPW2200_DOCS="README.ipw2200"
  32.  
  33. CONFIG_CHECK="NET_RADIO FW_LOADER !IPW2200"
  34. ERROR_NET_RADIO="${P} requires support for Wireless LAN drivers (non-hamradio) & Wireless Extensions (CONFIG_NET_RADIO)."
  35. ERROR_FW_LOADER="${P} requires Hotplug firmware loading support (CONFIG_FW_LOADER)."
  36. ERROR_IPW2200="${P} requires the in-kernel version of the IPW2200 driver to be disabled (CONFIG_IPW2200)"
  37.  
  38. pkg_setup() {
  39.     linux-mod_pkg_setup
  40.  
  41.     if kernel_is 2 4; then
  42.         die "${P} does not support building against kernel 2.4.x"
  43.     fi
  44.  
  45.     if [[ ! -f ${ROOT}/lib/modules/${KV_FULL}/net/ieee80211/ieee80211.${KV_OBJ} ]]; then
  46.         eerror
  47.         eerror "Looks like you forgot to remerge net-wireless/ieee80211 after"
  48.         eerror "upgrading your kernel."
  49.         eerror
  50.         eerror "Hint: use sys-kernel/module-rebuild for keeping track of which"
  51.         eerror "modules needs to be remerged after a kernel upgrade."
  52.         eerror
  53.         die "${ROOT}/lib/modules/${KV_FULL}/net/ieee80211/ieee80211.${KV_OBJ} not found"
  54.     fi
  55.  
  56.     BUILD_PARAMS="KSRC=${KV_DIR} KSRC_OUTPUT=${KV_OUT_DIR} IEEE80211_INC=/usr/include"
  57. }
  58.  
  59. src_unpack() {
  60.     local debug="n" radiotap="n"
  61.  
  62.     unpack ${A}
  63.  
  64.     cd ${S}
  65.     epatch ${FILESDIR}/${P}-modverdir.patch
  66.     epatch ${FILESDIR}/${P}-cflags.patch
  67.     epatch ${FILESDIR}/${P}-scan_fix.patch
  68.  
  69.     use debug && debug="y"
  70.     sed -i -e "s:^\(CONFIG_IPW2200_DEBUG\)=.*:\1=${debug}:" ${S}/Makefile
  71. }
  72.  
  73. src_compile() {
  74.     linux-mod_src_compile
  75.  
  76.     einfo
  77.     einfo "You may safely ignore any warnings from above compilation about"
  78.     einfo "undefined references to the ieee80211 subsystem."
  79.     einfo
  80. }
  81.  
  82. src_install() {
  83.     linux-mod_src_install
  84.  
  85.     dodoc CHANGES ISSUES
  86. }
  87.